/**
 * Created by Administrator on 2018/1/30.
 */
$(function(){
    laydate.render({
        elem: '[name=createTime]'
    });
    laydate.render({
        elem: '[name=lastTime]'
    });
});
function  searchDate() {
    var param={};
    param.createTime=$("[name=createTime]").val();
    param.lastTime=$("[name=lastTime]").val();
    $("Atable").bootstrapTable("refresh",{query:param});
}
function queryParams(param){
    param.createTime=$("[name=createTime]").val();
    param.lastTime=$("[name=lastTime]").val();
    return param;
}

function del() {
    var rows = $("#Atable").bootstrapTable("getSelections");
    if (rows.length == 0) {
        swal({
            title: '信息提示',
            text: "请选择删除项",
            type: "warning",
            confirmButtonText: "确定"
        });
    }

    $.post("/delete2",{id:rows[0].id} ,function (msg) {
        toastr.warning("信息提示",msg);
        console.log(rows[0].id);
        $("#Atable").bootstrapTable("refresh");
    });
}